cordova.define("bsl.cordova.plugins.share.share", function(require, exports, module) {
               
               var exec = require('cordova/exec');
               var cordova = require('cordova');
               var utils = require('cordova/utils');
               
               var share = {
               shareToSina:function(successFunc,failCallBack,option) {
               cordova.exec(successFunc,failCallBack,"SharePlugin","shareToSina",[{title:option.title,image:option.image,link:option.link}]);
               
               },
               shareToWeixinFavorite:function(successFunc,failCallBack,option) {
               cordova.exec(successFunc,failCallBack,"SharePlugin","shareToWeixinFavorite",[{title:option.title,image:option.image,link:option.link}]);
               
               },
               shareToWeixinSession:function(successFunc,failCallBack,option) {
               cordova.exec(successFunc,failCallBack,"SharePlugin","shareToWeixinSession",[{title:option.title,image:option.image,link:option.link}]);
               
               },
               shareToWeixinTimeline:function(successFunc,failCallBack,option) {
               
               cordova.exec(successFunc,failCallBack,"SharePlugin","shareToWeixinTimeline",[{title:option.title,image:option.image,link:option.link}]);
               
               },
               shareToQQFriends:function(successFunc,failCallBack,option) {
               
               cordova.exec(successFunc,failCallBack,"SharePlugin","shareToQQFriends",[{title:option.title,image:option.image,link:option.link}]);
               
               },
               shareToQQZone:function(successFunc,failCallBack,option) {
               
               cordova.exec(successFunc,failCallBack,"SharePlugin","shareToQQZone",[{title:option.title,image:option.image,link:option.link}]);
               
               },
               shareToQQFavorites:function(successFunc,failCallBack,option) {
               
               cordova.exec(successFunc,failCallBack,"SharePlugin","shareToQQFavorites",[{title:option.title,image:option.image,link:option.link}]);
               
               },
               
               shareToQQDataline:function(successFunc,failCallBack,option) {
               
               cordova.exec(successFunc,failCallBack,"SharePlugin","shareToQQDataline",[{title:option.title,image:option.image,link:option.link}]);
               
               },
               
               share :function (message, subject, fileOrFileArray, url, successCallback, errorCallback) {
               cordova.exec(successCallback, this._getErrorCallback(errorCallback, "share"), "SharePlugin", "share", [message, subject, this._asArray(fileOrFileArray), url]);
               },
               _asArray : function (param) {
               if (param == null) {
               param = [];
               } else if (typeof param === 'string') {
               param = new Array(param);
               }
               return param;
               },
               _getErrorCallback:function (ecb, functionName) {
               if (typeof ecb === 'function') {
               return ecb;
               } else {
               return function (result) {
               console.log("The injected error callback of '" + functionName + "' received: " + JSON.stringify(result));
               }
               }
               },
                   share:function(successFunc,failCallBack,option) {
                cordova.exec(successFunc,failCallBack,"SharePlugin","share",[{title:option.title,image:option.image,link:option.link}]);
               }
               
               };
               
//                              function install() {
//                              if (!window.plugins) {
//                              window.plugins = {};
//                              }
//               
//                              window.plugins.share =  share;
//                              return window.plugins.share;
//                              }
               
               module.exports =  share;
               
//                              cordova.addConstructor(install);
               
               })

